package com.youlu.campus.admin.data.controller;

import com.youlu.campus.entity.VO.req.ActivityDataQueryVO;
import com.youlu.campus.service.data.ActivityDataService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ActivityDataController {
    @Autowired
    private ActivityDataService activityDataService;

    @PostMapping("/activity/data/hour")
    public QResult hourData(@RequestBody ActivityDataQueryVO req) {
        return QResult.success(activityDataService.getHourDatas(req));
    }

    @PostMapping("/activity/data/day")
    public QResult dayData(@RequestBody ActivityDataQueryVO request) {
        return QResult.success(activityDataService.getDayDatas(request));
    }

}
